package no.thing;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

public class SimpleServiceClient {

	/**
	 * Connects to a Web Service.
	 */
	public static void main(String[] args) throws Exception {
		// Specify the URL
		final URL url = new URL("http://127.0.0.1:9000/simple");
		// Specify the qualified name
		final QName name = new QName("http://thing.no/", "SimpleServiceImplService");
		// Create the service
		final Service service = Service.create(url, name);
		// Get the port
		final SimpleService simple = service.getPort(SimpleService.class);
		// Call an operation
		System.out.println(simple.sayCheese());
	}

}
